﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ClassDAL;
using ClassModel;

namespace ClassBLL
{
    public class t_class_merge_BLL
    {
        /// <summary>
        /// 插入合班信息
        /// </summary>
        /// <param name="merge"></param>
        /// <returns></returns>
        public static int InsertClassMerge(t_class_merge merge)
        {
            if (merge == null) throw new ArgumentException("merge 合班model 不能为空!");

            return t_class_merge_DAL.InsertClassMerge(merge);
        }


        /// <summary>
        /// 根据任务id获取合班信息
        /// </summary>
        /// <param name="taskid"></param>
        /// <returns></returns>
        public static List<t_class_merge> GetMergeListWithTaskId(int taskid)
        {
            return t_class_merge_DAL.GetMergeListWithTaskId(taskid);
        }


         /// <summary>
        /// 根据课程id获取合班信息
        /// </summary>
        /// <param name="courseid"></param>
        /// <returns></returns>
        public static t_class_merge GetMergeInfoByCourseId(int courseid)
        {
            return t_class_merge_DAL.GetMergeInfoByCourseId(courseid);
        }

        /// <summary>
        /// 删除某条合班信息
        /// </summary>
        /// <param name="taskid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public static int DeleteMergeInfo(int taskid, int id)
        {
            return t_class_merge_DAL.DeleteMergeInfo(taskid, id);
        }
    }
}
